<link rel="stylesheet" href="__PUBLIC__/media/kindeditor-4.1.7/themes/default/default.css" />
<link rel="stylesheet" href="__PUBLIC__/media/kindeditor-4.1.7/themes/simple/simple.css" />
<link rel="stylesheet" href="__PUBLIC__/app/css/work_workUploads.css" />
<script charset="utf-8" src="__PUBLIC__/media/kindeditor-4.1.7/kindeditor-min.js"></script>
<script charset="utf-8" src="__PUBLIC__/media/kindeditor-4.1.7/lang/zh_CN.js"></script>
<script>

var editor;
KindEditor.ready(function(K) {
	editor = K.create('#work_edit', {
		allowFileManager : true,
		themeType : 'simple',
		afterBlur: function(){
			this.sync();
		} 
	});
	var text=document.getElementById('btn_test');
	text.onclick=function(){
		alert(K('#work_edit').val());
	}
});

</script>
<div class="row-fluid">

	<div class="span12">

		<!-- BEGIN STYLE CUSTOMIZER -->

		<div class="color-panel hidden-phone">
			
			<h3 class="page-title"><i class="icon-cogs"></i>作品上传</h3>
			<ul class="breadcrumb">

				<li>

					<i class="icon-picture"></i>

					<a href="{:U('Works/workUploads')}">作品上传</a> 

					<i class="icon-tags"></i>

				</li>

				<li>

					<a href="{:U('Works/workList')}">作品列表</a>

				</li>

			</ul>
		</div>
		<div class="form_input">
			<form id="work_edit_form"  action="{:U('Works/workSave')}" method="post" enctype="multipart/form-data" class="form-horizontal form">
				
				<input type="text" placeholder="title" name="title" class="span12 work_title">
				<br>
				<textarea placeholder="content" id="work_edit" name="work_edit" class="span11 m-wrap"></textarea>
				<div class="control-group">

					<label class="control-label">上传图片</label>

					<div class="controls">

						<input class="default" type="file" name="works_img">

					</div>
					<label class="control-label">上传文件</label>

					<div class="controls">

						<input class="default" type="file" name="works_file">

					</div>

					<label class="control-label">作品类型</label>
					<div class="controls">
						<select data-placeholder="请选择作品类型" class="chosen-with-diselect span6" tabindex="-1" name="type">
							<option value="web">web</option>
							<option value="APP">APP</option>
							<option value="Logo">Logo</option>
							<option value="电脑设计">电脑设计</option>
							<option value="字体设计">字体设计</option>
							<option value="包装">包装</option>
						</select>
					</div>
				</div>
				<button class="btn blue btn-block" type="submit" id="btn_form">提交<i class="m-icon-swapright m-icon-white"></i></button>
			</form>
		</div>
	</div>
</div>
<!-- <script type="text/javascript">
	$(function(){
		var edit=$("#work_edit");
		var btn=$("#btn_form");
		btn.click (function(){
			if(edit.val()!=""){
					$("#work_edit_form").submit();
				}
				
			else{
				alert();
				}
			});
		
	});
</script> -->